import { http1 } from '@/utils/http'
import type { mylogin } from '@/types/my'
// 获取聊天界面
export const liaotianAPI = (token, time1) => {
  console.log('liaotian发送了请求')

  // 聊天列表请求
  return http1<any>({
    method: 'post',
    url: `/api/liaotian`,
    data: { token, time1 },
  })
}
//获取 聊天内容
export const liaotianneironAPI = (userid, toid) => {
  console.log('liaotian11111发送了请求')

  // 聊天列表请求
  return http1<any>({
    method: 'post',
    url: `/api/concent`,
    data: { userid, toid },
  })
}
// 获取好友列表
export const liaotianfriendAPI = ({ id, username, user }) => {
  console.log('liaotian22222发送了请求')

  // 聊天列表请求
  return http1<any>({
    method: 'post',
    url: `/api/friends`,
    data: { id, username, user },
  })
}
export const liaotianfriendAPI1 = ({ id, username, uid, isFollow, item, user }) => {
  console.log('liaotian22222发送了请求')

  // 聊天列表请求
  return http1<any>({
    method: 'post',
    url: `/api/friends1`,
    data: { id, username, uid, isFollow, item, user },
  })
}
//点击进入详情页
export const getDetailAPI11 = (obj) => {
  return http1<any>({
    method: 'POST',
    url: `/api/getDetailAPI11`,
    data: { user:obj },
  })
}
